Dashboard Temp Share Shortlinks Frames API

HTMLify

index.html
Views: 340 | Author: cody
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<!DOCTYPE html>
<html>

<head>
    <meta charset='utf-8'>
    <meta http-equiv='X-UA-Compatible' content='IE=edge'>
    <title>Delete Button MI</title>
    <meta name='viewport' content='width=device-width, initial-scale=1'>
    <link rel='stylesheet' type='text/css' media='screen' href='style.css'>
</head>

<body>

    <button class="button">
        <div class="trash">
            <div class="top">
                <div class="paper"></div>
            </div>
            <div class="box"></div>
            <div class="check">
                <svg viewBox="0 0 8 6">
                    <polyline points="1 3.4 2.71428571 5 7 1"></polyline>
                </svg>
            </div>
        </div>
        <span>Delete Item</span>
    </button>

    <script>
        document.querySelectorAll(".button").forEach((button) =>
            button.addEventListener("click", (e) => {
                if (!button.classList.contains("delete")) {
                    button.classList.add("delete");
                    setTimeout(() => button.classList.remove("delete"), 3200);
                }
                e.preventDefault();
            })
        );
    </script>
</body>

</html>